function newsTicker(max, speed, interval) {
	var $post = $('#posts-lists'),
		obj = $post.find('li:first'),
		h = (obj.outerHeight()+parseInt(obj.css('margin-bottom'),10));
	$post.css({
		'height':(h*max)+'px',
		'overflow':'hidden'
	});
	function animTicker() {
		$post.find('li:eq('+(max-1)+')').animate({opacity:0},speed,function() {
			$post.find('li:last').css('opacity',0).hide().prependTo($post).slideDown(speed,function() {
				$(this).animate({opacity:1},speed);
			});
		});
	}
	setInterval(animTicker, interval);
}
function getPostFeed(json) {
	var ct = $('#posts-lists'),
		a = json.feed.entry, tt = "Untitled", lk = "", sm = "...", cm = "", sk = "";
	for (var i = 0, len = a.length; i < len; i++) {
		for (var j = 0, llk = a[i].link.length; j < llk; j++) {
			if (a[i].link[j].rel == "alternate") {
				lk = a[i].link[j].href;
				break;
			}
		}
		for (var k = 0; k < a[i].link.length; k++) {
			if (a[i].link[k].rel == "replies" && a[i].link[k].type == "text/html") {
				cm = a[i].link[k].title;
				break;
			}
		}
		sm = ("summary" in a[i]) ? a[i].summary.$t.substring(0,60)+'...' : '...';
		sk += '<li>';
		sk += '<a href="'+lk+'">'+a[i].title.$t+'</a>';
		sk += '<span class="summary">'+sm+'</span>';
		sk += '<span class="footer clearfix"><a class="pull-left comment-text" href="'+lk+'#comments">'+cm+'</a><a class="pull-right more" href="'+lk+'#more">Baca Selengkapnya</a></span>';
		sk += '</li>';
	}
	ct.html(sk);
	newsTicker(4, 1000, 10000);
}